// $Id$

/**
 * Allow visitors to see the html version of a Ventrilo client's comment.
 */
Drupal.behaviors.ventstatus = function(context) {
  $('span.client-comment', context).each(function () {
    var commentIcon = $(this);
    var commentRow = commentIcon.parent().parent().next();
    
    commentIcon.attr('title', Drupal.t('Show/hide comment'));
    commentIcon.css({'cursor' : 'pointer'});
    
    var toggleCommentRow = function() {
      commentRow.toggle();
    };
    
    commentIcon.click(toggleCommentRow);
  });
}
